home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / cparse < prev    next >
Text File  |  2001-03-21  |  2KB  |  45 lines

  1. Synopsis:
  2.    $cparse(<text>)
  3.    $cparse(<text> <arguments>...)
  4.  
  5. Technical:
  6.    This function parses <text> according to the following table:
  7.  
  8.    Any instance of         will be replaced with ^C codes to change the
  9.                            text to         text to         background to
  10.    ---------------------------------------------------------------------
  11.    %k      %K      %0      black           bold black      black
  12.    %r      %R      %1      red             bold red        red
  13.    %g      %G      %2      green           bold green      green
  14.    %y      %Y      %3      yellow          bold yellow     yellow
  15.    %b      %B      %4      blue            bold blue       blue
  16.    %m      %M      %5      magenta         bold magenta    magenta
  17.    %p      %P              magenta (think: purple)
  18.    %c      %C      %6      cyan            bold cyan       cyan
  19.    %w      %W      %7      white           bold white      white
  20.    %F                      Flashing attribute turned on
  21.    %n                      All colors turned off
  22.    %N                      Don't put a clear-color tag at the of output
  23.    %%                      A single %
  24.    
  25.    If the first argument to $cparse() is an extended word (string with
  26.    quotes), it will be parsed similar to bitchx. (example below)
  27.  
  28. Practical:
  29.    This is a convenient way add color to scripts without actually using
  30.    the control-c character.
  31.  
  32. Returns:
  33.    <text> parsed according to the rules in the above table
  34.  
  35. Examples:
  36.    $cparse(bl%Bah)
  37.      returns
  38.    bl^C4ah
  39.      where ^C4 is the control-c color code for blue.
  40.  
  41.    $cparse("This is a $0 test" cparse)
  42.      returns
  43.    This is a cparse test
  44.  
  45.